package com.pan.admin.module.visualizer.controller;

import com.pan.admin.common.core.controller.BaseController;
import com.pan.admin.common.core.page.TableDataInfo;
import com.pan.admin.module.datareport.entity.StartTimeAndEndTime;
import com.pan.admin.module.visualizer.entity.vo.LoanMarketVisualizerVO;
import com.pan.admin.module.visualizer.service.LoanMarketVisualizerService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 贷超
 *
 * @author caoxin
 */
@RestController
public class LoanMarketVisualizerController extends BaseController {

    @Autowired
    private LoanMarketVisualizerService loanMarketVisualizerService;

    @GetMapping("/visualizer/loanMarket/list")
    @PreAuthorize("@ss.hasPermi('visualizer:loanMarket:list')")
    public TableDataInfo list(StartTimeAndEndTime startTimeAndEndTime, @RequestParam(required = false) String name) {
        startPage();
        List<LoanMarketVisualizerVO> list = this.loanMarketVisualizerService.list(startTimeAndEndTime, name);
        return getDataTable(list);
    }

}
